//
//  NSString+ZOD.m
//  ZTEOnlineDoc
//
//  Created by 万伟琦 on 2018/9/13.
//  Copyright © 2018年 ZTE. All rights reserved.
//

#import "NSString+ZOD.h"

@implementation NSString (ZOD)

- (NSString *)zod_trim {
    NSString *newString = self;
    //去除掉首尾的空白字符和换行字符
    newString = [newString stringByReplacingOccurrencesOfString:@"\r" withString:@""];
    newString = [newString stringByReplacingOccurrencesOfString:@"\n" withString:@""];
    newString = [newString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];  //去除掉首尾的空白字符和换行字符使用
    newString = [newString stringByReplacingOccurrencesOfString:@" " withString:@""];
    //    可以去掉空格，注意此时生成的strUrl是autorelease属性的，所以不必对strUrl进行release操作！
    return newString;
}

@end
